package com.chen.config;

import com.chen.filter.MyTypeFilter;
import com.chen.service.UserService2;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.FilterType;
import org.springframework.stereotype.Controller;

//@ComponentScan(value= "com.chen")
//@ComponentScan(value="com.chen.dao",useDefaultFilters=true,basePackageClasses= UserService.class)
//@ComponentScan(value = "com.chen",useDefaultFilters = true,includeFilters = {
//        @ComponentScan.Filter(type=FilterType.ANNOTATION,classes={Controller.class}),
//        @ComponentScan.Filter(type= FilterType.ASSIGNABLE_TYPE,classes={UserService2.class})
//})
@ComponentScan(value= "com.chen",useDefaultFilters=true,
        includeFilters={
                @ComponentScan.Filter(type=FilterType.ANNOTATION,classes={Controller.class}),
                @ComponentScan.Filter(type=FilterType.CUSTOM,classes={MyTypeFilter.class})
        })
@Configuration
public class MainScanConfig {
}
